op {
  graph_op_name: "BoostedTreesSparseAggregateStats"
  deprecation_message: "Boosted Trees kernels in TF are deprecated. Please use TensorFlow Decision Forests instead (https://github.com/tensorflow/decision-forests)"
  visibility: HIDDEN
  in_arg {
    name: "node_ids"
    description: <<END
int32; Rank 1 Tensor containing node ids for each example, shape [batch_size].
END
  }
  in_arg {
    name: "gradients"
    description: <<END
float32; Rank 2 Tensor (shape=[batch_size, logits_dimension]) with gradients for each example.
END
  }
  in_arg {
    name: "hessians"
    description: <<END
float32; Rank 2 Tensor (shape=[batch_size, hessian_dimension]) with hessians for each example.
END
  }
  in_arg {
    name: "feature_indices"
    description: <<END
int32; Rank 2 indices of feature sparse Tensors (shape=[number of sparse entries, 2]).
Number of sparse entries across all instances from the batch. The first value is
the index of the instance, the second is dimension of the feature. The second axis
can only have 2 values, i.e., the input dense version of Tensor can only be matrix.
END
  }
  in_arg {
    name: "feature_values"
    description: <<END
int32; Rank 1 values of feature sparse Tensors (shape=[number of sparse entries]).
Number of sparse entries across all instances from the batch. The first value is
the index of the instance, the second is dimension of the feature.
END
  }
  in_arg {
    name: "feature_shape"
    description: <<END
int32; Rank 1 dense shape of feature sparse Tensors (shape=[2]).
The first axis can only have 2 values, [batch_size, feature_dimension].
END
  }
  out_arg {
    name: "stats_summary_indices"
    description: <<END
int32; Rank 2 indices of summary sparse Tensors (shape=[number of non zero statistics, 4])
The second axis can only be 4 including node id, feature dimension, bucket id, and statistics_dimension.
statistics_dimension = logits_dimension + hessian_dimension.
END
  }
  out_arg {
    name: "stats_summary_values"
    description: <<END
output Rank 1 Tensor (shape=[number of non zero statistics])
END
  }
  out_arg {
    name: "stats_summary_shape"
    description: <<END
output Rank 1 Tensor (shape=[4])
The tensor has following 4 values: [max_splits, feature_dimension, num_buckets, statistics_dimension],
where statistics_dimension = gradient_dimension + hessian_dimension. gradient_dimension
is the same as label_dimension, i.e., the output space. hessian_dimension can be the same
as logits dimension when diagonal hessian is used, or label_dimension^2 when full
hessian is used.
END
  }
  attr {
    name: "max_splits"
    description: <<END
int; the maximum number of splits possible in the whole tree.
END
  }
  attr {
    name: "num_buckets"
    description: <<END
int; equals to the maximum possible value of bucketized feature + 1.
END
  }
  summary: "Aggregates the summary of accumulated stats for the batch."
  description: <<END
The summary stats contains gradients and hessians accumulated for each node, bucket and dimension id.
END
}
